aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/app/(main)/goals/[id]/page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/(main)/goals/[id]/page.tsx')
-rw-r--r--frontend/src/app/(main)/goals/[id]/page.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend/src/app/(main)/goals/[id]/page.tsx b/frontend/src/app/(main)/goals/[id]/page.tsx
index 3428ca4..cda33c1 100644
--- a/frontend/src/app/(main)/goals/[id]/page.tsx
+++ b/frontend/src/app/(main)/goals/[id]/page.tsx
@@ -12,9 +12,12 @@ import { useToast } from "@/components/ui/use-toast";
import { formatCurrency } from "@/lib/utils";
import { api } from "@/lib/api";
import { GoalProgress } from "../components/goals-list";
+import { use } from "react";
export default function GoalDetailPage({ params }: { params: { id: string } }) {
- const id = params.id;
+ // Unwrap params Promise using React.use()
+ const unwrappedParams = use(params);
+ const id = unwrappedParams.id;
const goalId = parseInt(id);
const [goal, setGoal] = useState<GoalWithProgress | null>(null);